import request from '@/utils/request'

export default{
// 根据分页和多条件查询数据
  getTeacherPage(current, limit, teacherQuery) {
    return request({
      url: `/eduservice/teacher/pageCondition/${current}/${limit}`,
      method: 'post',
      data: {
        ...teacherQuery
      }
    })
  },

  getTeacher() {
    return request({
      url: `/eduservice/teacher/findAll`,
      method: 'get'

    })
  },
  // 删除数据
  deleteTeacher(id) {
    return request({
      url: `/eduservice/teacher/${id}`,
      method: 'delete'
    })
  },
  // 保存数据
  saveTeacher(formLabelAlign) {
    return request({
      url: `/eduservice/teacher/addTeacher`,
      method: 'post',
      data: {
        ...formLabelAlign
      }
    })
  },
  // 根据id获得数据
  getTeacherId(id) {
    return request({
      url: `/eduservice/teacher/getTeacher/${id}`,
      method: 'get'
    })
  },
  // 更新操作
  updateTeacher(eduTeacher) {
    return request({
      url: `/eduservice/teacher/updateTeacher`,
      method: 'post',
      data: {
        ...eduTeacher
      }

    })
  }
}
